// 公开市场模块
import { authedApi } from '../utils/axios'
// 获取公开市场数据
export function getMarket(project_id, params = {}) {
  return authedApi.get(`/projects/${project_id}/models/market/`, { params });
}
// 算法订阅
export function subscription(project_id,model_id) {
  return authedApi.post(`/projects/${project_id}/models/${model_id}/subscription/`);
}
// 取消算法订阅
export function unSubscription(project_id,model_id) {
  return authedApi.delete(`/projects/${project_id}/models/${model_id}/unsubscription/`);
}
// 算法发布公开市场
export function publicMarket(project_id,model_id, params = {}) {
  return authedApi.put(`/projects/${project_id}/models/${model_id}/public/`, { params });
}
// 算法下架公开市场
export function unPublicMarket(project_id,model_id, params = {}) {
  return authedApi.put(`/projects/${project_id}/models/${model_id}/unpublic/`, { params });
}
